import {
  // Button, // 会自动根据模板使用来添加
  // Loading,
  Toast,
  // NavBar,
  // Popup,
  // Swipe,
  // SwipeItem,
  // Tab,
  // Tabs,
  // ConfigProvider,
  // Image as VanImage,
  // List,
} from "vant";
import "vant/es/toast/style";
import CommonAlert from "@/components/common-alert";
import CommonNav from "@/components/common-nav/index.vue";

const components = [
  // Loading,
  // Button,
  // Toast,
  // NavBar,
  // Popup,
  // Swipe,
  // SwipeItem,
  // Tab,
  // Tabs,
  // ConfigProvider,
  // VanImage,
  // List,
  CommonAlert,
];

export default (app) => {
  app.config.globalProperties.$toast = Toast; // 根组件挂载
  components.forEach((component) => {
    app.use(component);
  });

  app.component("CommonNav", CommonNav);
};
